//
//  ZTTableViewCell.m
//  FD
//
//  Created by xiaofang wang on 2018/11/7.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//

#import "ZTTableViewCell.h"
@interface ZTTableViewCell()
@property (weak, nonatomic) IBOutlet UIImageView *iconIv;
@property (weak, nonatomic) IBOutlet UILabel *nameLb;
@property (weak, nonatomic) IBOutlet UILabel *addressLb;

@end

@implementation ZTTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)setModel:(ZTModel *)model {
    _model = model;
    if (model.isSelected) {
        self.iconIv.image = [UIImage imageNamed:@"selected"];
    }else {
        self.iconIv.image = [UIImage imageNamed:@"unselected"];
    }
    self.nameLb.text = model.name;
    self.addressLb.text = model.address;
}



@end
